#ifndef PLAYBACKSHORTCUTSETTINGS_H
#define PLAYBACKSHORTCUTSETTINGS_H

#include "button.h"
#include <Maestro/database.h>
#include "keycontrollablemenu.h"
#include "keydialog.h"
#include "settingsmenuitem.h"

class PlaybackShortcutSettings : public SettingsMenuItem
{
    Q_OBJECT
public:
    PlaybackShortcutSettings(QWidget * parent=0);
    void saveTest();
    void assertSaved();
    void cancelTest();
    void assertCancelled();
public slots:
    void buttonSelected();
    void save();
    void cancel();
    void reshowComponents();
    void updateShortcut(KeyDialog * dialog);
private:
    void initializeButtons();
    void addButton(QString name, QLabel * label, Button * button);
    void addDialog(Button * button);
    void save(QString name, Button * button);
    void loadBindings();
    QString getModifierString(int modifiers);
    Button * changePlay;
    Button * changeStop;
    Button * changeFF;
    Button * changeRW;
    Button * changeSkip;
    Button * changePrev;
    Button * changeFullS;
    QLabel * playLabel;
    QLabel * stopLabel;
    QLabel * ffLabel;
    QLabel * rwLabel;
    QLabel * skipLabel;
    QLabel * prevLabel;
    QLabel * fullScreenLabel;
    QHash<KeyDialog *, QLabel *> hash;
    Button * saveButton;
    Button * cancelButton;
    QList<Button *> buttons;
};

#endif // PLAYBACKSHORTCUTSETTINGS_H
